#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    void setdefaultpath(void);
    QString outname;
    QString outnamenoboot;
    QString apppath;
    QString outpath;
    QString bootpath;
    QStringList  args;
    typedef struct{
        unsigned char datalen;//数据字节
        unsigned short addr;//地址域
        unsigned char datatype;//类型
        unsigned char databuf[16];//数据记录
        unsigned char checkout;//校验和
    }HexFormatForLine ;

private slots:
    void on_pushButton_2_clicked();
    void on_pushButtonoutfile_clicked();
    void on_pushButton_only_clicked();


private:
    Ui::MainWindow *ui;
    bool ReadHexLineData(HexFormatForLine* out,const QByteArray & ba);
    QString setdate(QString path);

};
#endif // MAINWINDOW_H
